package com.black.play.constant;

import com.black.play.config.AppConfig;

public interface AppConstant
{
    String appLanguage = AppConfig.getOrDefault("app.language", "CH");
    boolean isChinese = appLanguage.equals("CH");
    int SECOND = 1000;
    String GAME = "game";
    String PAUSE = "pause";
    String MENU = "menu";
    String TITLE = isChinese ? CH.TITLE : EN.TITLE;
    String SCORE = isChinese ? CH.SCORE : EN.SCORE;
    String LENGTH = isChinese ? CH.LENGTH : EN.LENGTH;
    String SPEED = isChinese ? CH.SPEED : EN.SPEED;
    String TIME = isChinese ? CH.TIME : EN.TIME;
    String TIPS = isChinese ? CH.TIPS : EN.TIPS;
    String START = isChinese ? CH.START : EN.START;
    String CONTINUE = isChinese ? CH.CONTINUE : EN.CONTINUE;
    String BACK = isChinese ? CH.BACK : EN.BACK;
    String RESTART = isChinese ? CH.RESTART : EN.RESTART;
    String EXIT = isChinese ? CH.EXIT : EN.EXIT;
    String SETTINGS = isChinese ? CH.SETTINGS : EN.SETTINGS;
    String INIT_ERROR = isChinese ? CH.INIT_ERROR : EN.INIT_ERROR;

    interface CH
    {
        String TITLE = "贪吃蛇";
        String SCORE = "得分: ";
        String LENGTH = "长度: ";
        String SPEED = "速度: ";
        String TIME = "计时: ";
        String TIPS = "[Space] 开始或暂停 [Esc] 暂停退出 [↑↓←→] 或 [WASD]移动";
        String START = "开始游戏";
        String CONTINUE = "继续游戏";
        String BACK = "回主菜单";
        String RESTART = "重新开始";
        String EXIT = "退出游戏";
        String SETTINGS = "设置";
        String INIT_ERROR = "蛇初始长度必须大于0";
    }

    interface EN
    {
        String TITLE = "Snake";
        String SCORE = "score: ";
        String LENGTH = "length: ";
        String SPEED = "speed: ";
        String TIME = "time: ";
        String TIPS = "[Space] start or pause, [Esc] pause or exit [↑↓←→]|[WASD] move";
        String START = "Start Game";
        String CONTINUE = "CONTINUE";
        String BACK = "Return Menu";
        String RESTART = "Restart";
        String EXIT = "Exit";
        String SETTINGS = "Settings";
        String INIT_ERROR = "init length must greater than 0";
    }
}
